home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / OCE.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  54.4 KB  |  1,449 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OCE.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment (AOCE) Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __OCE__
  19. #define __OCE__
  20.  
  21. #ifndef REZ
  22. #ifndef __TYPES__
  23. #include <Types.h>
  24. #endif
  25. #ifndef __ALIASES__
  26. #include <Aliases.h>
  27. #endif
  28. #ifndef __APPLEEVENTS__
  29. #include <AppleEvents.h>
  30. #endif
  31.  
  32.  
  33.  
  34. #if PRAGMA_ONCE
  35. #pragma once
  36. #endif
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. #if PRAGMA_IMPORT
  43. #pragma import on
  44. #endif
  45.  
  46. #if PRAGMA_STRUCT_ALIGN
  47.     #pragma options align=mac68k
  48. #elif PRAGMA_STRUCT_PACKPUSH
  49.     #pragma pack(push, 2)
  50. #elif PRAGMA_STRUCT_PACK
  51.     #pragma pack(2)
  52. #endif
  53.  
  54. /* All utility routines defined here are callable at interrupt level. */
  55. typedef unsigned short                     OCERecordTypeIndex;
  56. typedef unsigned short                     OCEAttributeTypeIndex;
  57. /* For anyone who absolutely needs a define of the body of the standard record or
  58. attribute type, use these below.  CAUTION!  All the types below are assumed to be
  59. in character set 'smRoman'.  If you try to compare these to some RString or
  60. AttributeType variable, you must take the character set code into account.  Future
  61. standard types may be defined using character sets other than 'smRoman'. */
  62.  
  63. /* All these standard definitions begin with the Apple symbol (not shown here).
  64.  
  65. NOTE:  To access these, you must call OCEGetIndRecordType or OCEGetIndAttributeType
  66. with the proper index.  These routines return pointers to the standard type.
  67. This was done so that code fragments (INITs, CDEVs, CSAMs, etc). which cannot
  68. use global data can also use these. */
  69. /* Indices for the standard definitions for certain record types (OCERecordTypeIndex): */
  70.  
  71. enum {
  72.     kUserRecTypeNum                = 1,                            /* "User" */
  73.     kGroupRecTypeNum            = 2,                            /* "Group" */
  74.     kMnMRecTypeNum                = 3,                            /* "AppleMail™ M&M" */
  75.     kMnMForwarderRecTypeNum        = 4,                            /* "AppleMail™ Fwdr" */
  76.     kNetworkSpecRecTypeNum        = 5,                            /* "NetworkSpec" */
  77.     kADAPServerRecTypeNum        = 6,                            /* "ADAP Server" */
  78.     kADAPDNodeRecTypeNum        = 7,                            /* "ADAP DNode" */
  79.     kADAPDNodeRepRecTypeNum        = 8,                            /* "ADAP DNode Rep" */
  80.     kServerSetupRecTypeNum        = 9,                            /* "Server Setup" */
  81.     kDirectoryRecTypeNum        = 10,                            /* "Directory" */
  82.     kDNodeRecTypeNum            = 11,                            /* "DNode" */
  83.     kSetupRecTypeNum            = 12,                            /* "Setup" */
  84.     kMSAMRecTypeNum                = 13,                            /* "MSAM" */
  85.     kDSAMRecTypeNum                = 14,                            /* "DSAM" */
  86.     kAttributeValueRecTypeNum    = 15,                            /* "Attribute Value" */
  87.     kBusinessCardRecTypeNum        = 16,                            /* "Business Card" */
  88.     kMailServiceRecTypeNum        = 17,                            /* "Mail Service" */
  89.     kCombinedRecTypeNum            = 18,                            /* "Combined" */
  90.     kOtherServiceRecTypeNum        = 19,                            /* "Other Service" */
  91.     kAFPServiceRecTypeNum        = 20,                            /* "Other Service afps" */
  92.     kFirstOCERecTypeNum            = kUserRecTypeNum,                /* first standard OCE record type */
  93.     kLastOCERecTypeNum            = kAFPServiceRecTypeNum,        /* last standard OCE record type */
  94.     kNumOCERecTypes                = (kLastOCERecTypeNum - kFirstOCERecTypeNum + 1)
  95. };
  96.  
  97. /* Indices for the standard definitions for certain attribute types (OCEAttributeTypeIndex): */
  98.  
  99. enum {
  100.     kMemberAttrTypeNum            = 1001,                            /* "Member" */
  101.     kAdminsAttrTypeNum            = 1002,                            /* "Administrators" */
  102.     kMailSlotsAttrTypeNum        = 1003,                            /* "mailslots" */
  103.     kPrefMailAttrTypeNum        = 1004,                            /* "pref mailslot" */
  104.     kAddressAttrTypeNum            = 1005,                            /* "Address" */
  105.     kPictureAttrTypeNum            = 1006,                            /* "Picture" */
  106.     kAuthKeyAttrTypeNum            = 1007,                            /* "auth key" */
  107.     kTelephoneAttrTypeNum        = 1008,                            /* "Telephone" */
  108.     kNBPNameAttrTypeNum            = 1009,                            /* "NBP Name" */
  109.     kQMappingAttrTypeNum        = 1010,                            /* "ForwarderQMap" */
  110.     kDialupSlotAttrTypeNum        = 1011,                            /* "DialupSlotInfo" */
  111.     kHomeNetAttrTypeNum            = 1012,                            /* "Home Internet" */
  112.     kCoResAttrTypeNum            = 1013,                            /* "Co-resident M&M" */
  113.     kFwdrLocalAttrTypeNum        = 1014,                            /* "FwdrLocalRecord" */
  114.     kConnectAttrTypeNum            = 1015,                            /* "Connected To" */
  115.     kForeignAttrTypeNum            = 1016,                            /* "Foreign RLIs" */
  116.     kOwnersAttrTypeNum            = 1017,                            /* "Owners" */
  117.     kReadListAttrTypeNum        = 1018,                            /* "ReadList" */
  118.     kWriteListAttrTypeNum        = 1019,                            /* "WriteList" */
  119.     kDescriptorAttrTypeNum        = 1020,                            /* "Descriptor" */
  120.     kCertificateAttrTypeNum        = 1021,                            /* "Certificate" */
  121.     kMsgQsAttrTypeNum            = 1022,                            /* "MessageQs" */
  122.     kPrefMsgQAttrTypeNum        = 1023,                            /* "PrefMessageQ" */
  123.     kMasterPFAttrTypeNum        = 1024,                            /* "MasterPF" */
  124.     kMasterNetSpecAttrTypeNum    = 1025,                            /* "MasterNetSpec" */
  125.     kServersOfAttrTypeNum        = 1026,                            /* "Servers Of" */
  126.     kParentCIDAttrTypeNum        = 1027,                            /* "Parent CID" */
  127.     kNetworkSpecAttrTypeNum        = 1028,                            /* "NetworkSpec" */
  128.     kLocationAttrTypeNum        = 1029,                            /* "Location" */
  129.     kTimeSvrTypeAttrTypeNum        = 1030,                            /* "TimeServer Type" */
  130.     kUpdateTimerAttrTypeNum        = 1031,                            /* "Update Timer" */
  131.     kShadowsOfAttrTypeNum        = 1032,                            /* "Shadows Of" */
  132.     kShadowServerAttrTypeNum    = 1033,                            /* "Shadow Server" */
  133.     kTBSetupAttrTypeNum            = 1034,                            /* "TB Setup" */
  134.     kMailSetupAttrTypeNum        = 1035,                            /* "Mail Setup" */
  135.     kSlotIDAttrTypeNum            = 1036,                            /* "SlotID" */
  136.     kGatewayFileIDAttrTypeNum    = 1037,                            /* "Gateway FileID" */
  137.     kMailServiceAttrTypeNum        = 1038,                            /* "Mail Service" */
  138.     kStdSlotInfoAttrTypeNum        = 1039,                            /* "Std Slot Info" */
  139.     kAssoDirectoryAttrTypeNum    = 1040,                            /* "Asso. Directory" */
  140.     kDirectoryAttrTypeNum        = 1041,                            /* "Directory" */
  141.     kDirectoriesAttrTypeNum        = 1042,                            /* "Directories" */
  142.     kSFlagsAttrTypeNum            = 1043,                            /* "SFlags" */
  143.     kLocalNameAttrTypeNum        = 1044,                            /* "Local Name" */
  144.     kLocalKeyAttrTypeNum        = 1045,                            /* "Local Key" */
  145.     kDirUserRIDAttrTypeNum        = 1046,                            /* "Dir User RID" */
  146.     kDirUserKeyAttrTypeNum        = 1047,                            /* "Dir User Key" */
  147.     kDirNativeNameAttrTypeNum    = 1048,                            /* "Dir Native Name" */
  148.     kCommentAttrTypeNum            = 1049,                            /* "Comment" */
  149.     kRealNameAttrTypeNum        = 1050,                            /* "Real Name" */
  150.     kPrivateDataAttrTypeNum        = 1051,                            /* "Private Data" */
  151.     kDirTypeAttrTypeNum            = 1052,                            /* "Directory Type" */
  152.     kDSAMFileAliasAttrTypeNum    = 1053,                            /* "DSAM File Alias" */
  153.     kCanAddressToAttrTypeNum    = 1054,                            /* "Can Address To" */
  154.     kDiscriminatorAttrTypeNum    = 1055,                            /* "Discriminator" */
  155.     kAliasAttrTypeNum            = 1056,                            /* "Alias" */
  156.     kParentMSAMAttrTypeNum        = 1057,                            /* "Parent MSAM" */
  157.     kParentDSAMAttrTypeNum        = 1058,                            /* "Parent DSAM" */
  158.     kSlotAttrTypeNum            = 1059,                            /* "Slot" */
  159.     kAssoMailServiceAttrTypeNum    = 1060,                            /* "Asso. Mail Service" */
  160.     kFakeAttrTypeNum            = 1061,                            /* "Fake" */
  161.     kInheritSysAdminAttrTypeNum    = 1062,                            /* "Inherit SysAdministrators" */
  162.     kPreferredPDAttrTypeNum        = 1063,                            /* "Preferred PD" */
  163.     kLastLoginAttrTypeNum        = 1064,                            /* "Last Login" */
  164.     kMailerAOMStateAttrTypeNum    = 1065,                            /* "Mailer AOM State" */
  165.     kMailerSendOptionsAttrTypeNum = 1066,                        /* "Mailer Send Options" */
  166.     kJoinedAttrTypeNum            = 1067,                            /* "Joined" */
  167.     kUnconfiguredAttrTypeNum    = 1068,                            /* "Unconfigured" */
  168.     kVersionAttrTypeNum            = 1069,                            /* "Version" */
  169.     kLocationNamesAttrTypeNum    = 1070,                            /* "Location Names" */
  170.     kActiveAttrTypeNum            = 1071,                            /* "Active" */
  171.     kDeleteRequestedAttrTypeNum    = 1072,                            /* "Delete Requested" */
  172.     kGatewayTypeAttrTypeNum        = 1073,                            /* "Gateway Type" */
  173.     kFirstOCEAttrTypeNum        = kMemberAttrTypeNum,            /* first standard OCE attr type */
  174.     kLastOCEAttrTypeNum            = kGatewayTypeAttrTypeNum,        /* last standard OCE attr type */
  175.     kNumOCEAttrTypes            = (kLastOCEAttrTypeNum - kFirstOCEAttrTypeNum + 1)
  176. };
  177.  
  178.  
  179. #endif /* REZ */
  180.  
  181. /* Standard definitions for certain record types: */
  182.  
  183. #define  kUserRecTypeBody             "aoce User"
  184. #define  kGroupRecTypeBody            "aoce Group"
  185. #define  kMnMRecTypeBody            "aoce AppleMail™ M&M"
  186. #define  kMnMForwarderRecTypeBody    "aoce AppleMail™ Fwdr"
  187. #define  kNetworkSpecRecTypeBody    "aoce NetworkSpec"
  188. #define  kADAPServerRecTypeBody        "aoce ADAP Server"
  189. #define  kADAPDNodeRecTypeBody        "aoce ADAP DNode"
  190. #define  kADAPDNodeRepRecTypeBody    "aoce ADAP DNode Rep"
  191. #define  kServerSetupRecTypeBody    "aoce Server Setup"
  192. #define  kDirectoryRecTypeBody        "aoce Directory"
  193. #define  kDNodeRecTypeBody            "aoce DNode"
  194. #define  kSetupRecTypeBody            "aoce Setup"
  195. #define  kMSAMRecTypeBody            "aoce MSAM"
  196. #define  kDSAMRecTypeBody            "aoce DSAM"
  197. #define  kAttributeValueRecTypeBody    "aoce Attribute Value"
  198. #define  kBusinessCardRecTypeBody    "aoce Business Card"
  199. #define  kMailServiceRecTypeBody    "aoce Mail Service"
  200. #define  kCombinedRecTypeBody        "aoce Combined"
  201. #define  kOtherServiceRecTypeBody    "aoce Other Service"
  202. #define  kAFPServiceRecTypeBody        "aoce Other Service afps"
  203.  
  204. /* Standard definitions for certain attribute types: */
  205.  
  206. #define  kMemberAttrTypeBody        "aoce Member"
  207. #define  kAdminsAttrTypeBody        "aoce Administrators"
  208. #define  kMailSlotsAttrTypeBody        "aoce mailslots"
  209. #define  kPrefMailAttrTypeBody        "aoce pref mailslot"
  210. #define  kAddressAttrTypeBody        "aoce Address"
  211. #define  kPictureAttrTypeBody        "aoce Picture"
  212. #define  kAuthKeyAttrTypeBody        "aoce auth key"
  213. #define  kTelephoneAttrTypeBody        "aoce Telephone"
  214. #define  kNBPNameAttrTypeBody        "aoce NBP Name"
  215. #define  kQMappingAttrTypeBody        "aoce ForwarderQMap"
  216. #define  kDialupSlotAttrTypeBody    "aoce DialupSlotInfo"
  217. #define  kHomeNetAttrTypeBody        "aoce Home Internet"
  218. #define  kCoResAttrTypeBody            "aoce Co-resident M&M"
  219. #define  kFwdrLocalAttrTypeBody        "aoce FwdrLocalRecord"
  220. #define  kConnectAttrTypeBody        "aoce Connected To"
  221. #define  kForeignAttrTypeBody        "aoce Foreign RLIs"
  222. #define  kOwnersAttrTypeBody        "aoce Owners"
  223. #define  kReadListAttrTypeBody        "aoce ReadList"
  224. #define  kWriteListAttrTypeBody        "aoce WriteList"
  225. #define  kDescriptorAttrTypeBody    "aoce Descriptor"
  226. #define  kCertificateAttrTypeBody    "aoce Certificate"
  227. #define  kMsgQsAttrTypeBody            "aoce MessageQs"
  228. #define  kPrefMsgQAttrTypeBody        "aoce PrefMessageQ"
  229. #define  kMasterPFAttrTypeBody        "aoce MasterPF"
  230. #define  kMasterNetSpecAttrTypeBody    "aoce MasterNetSpec"
  231. #define  kServersOfAttrTypeBody        "aoce Servers Of"
  232. #define  kParentCIDAttrTypeBody        "aoce Parent CID"
  233. #define  kNetworkSpecAttrTypeBody    "aoce NetworkSpec"
  234. #define  kLocationAttrTypeBody        "aoce Location"
  235. #define  kTimeSvrTypeAttrTypeBody    "aoce TimeServer Type"
  236. #define  kUpdateTimerAttrTypeBody    "aoce Update Timer"
  237. #define  kShadowsOfAttrTypeBody        "aoce Shadows Of"
  238. #define  kShadowServerAttrTypeBody    "aoce Shadow Server"
  239. #define  kTBSetupAttrTypeBody        "aoce TB Setup"
  240. #define  kMailSetupAttrTypeBody        "aoce Mail Setup"
  241. #define  kSlotIDAttrTypeBody        "aoce SlotID"
  242. #define  kGatewayFileIDAttrTypeBody    "aoce Gateway FileID"
  243. #define  kMailServiceAttrTypeBody    "aoce Mail Service"
  244. #define  kStdSlotInfoAttrTypeBody    "aoce Std Slot Info"
  245. #define  kAssoDirectoryAttrTypeBody    "aoce Asso. Directory"
  246. #define  kDirectoryAttrTypeBody        "aoce Directory"
  247. #define  kDirectoriesAttrTypeBody    "aoce Directories"
  248. #define  kSFlagsAttrTypeBody        "aoce SFlags"
  249. #define  kLocalNameAttrTypeBody        "aoce Local Name"
  250. #define  kLocalKeyAttrTypeBody        "aoce Local Key"
  251. #define  kDirUserRIDAttrTypeBody    "aoce Dir User RID"
  252. #define  kDirUserKeyAttrTypeBody    "aoce Dir User Key"
  253. #define  kDirNativeNameAttrTypeBody    "aoce Dir Native Name"
  254. #define  kCommentAttrTypeBody        "aoce Comment"
  255. #define  kRealNameAttrTypeBody        "aoce Real Name"
  256. #define  kPrivateDataAttrTypeBody    "aoce Private Data"
  257. #define  kDirTypeAttrTypeBody        "aoce Directory Type"
  258. #define  kDSAMFileAliasAttrTypeBody    "aoce DSAM File Alias"
  259. #define  kCanAddressToAttrTypeBody    "aoce Can Address To"
  260. #define  kDiscriminatorAttrTypeBody    "aoce Discriminator"
  261. #define  kAliasAttrTypeBody            "aoce Alias"
  262. #define  kParentMSAMAttrTypeBody    "aoce Parent MSAM"
  263. #define  kParentDSAMAttrTypeBody    "aoce Parent DSAM"
  264. #define  kSlotAttrTypeBody                "aoce Slot"
  265. #define  kAssoMailServiceAttrTypeBody     "aoce Asso. Mail Service"
  266. #define  kFakeAttrTypeBody                "aoce Fake"
  267. #define  kInheritSysAdminAttrTypeBody     "aoce Inherit SysAdministrators"
  268. #define  kPreferredPDAttrTypeBody        "aoce Preferred PD"
  269. #define  kLastLoginAttrTypeBody            "aoce Last Login"
  270. #define  kMailerAOMStateAttrTypeBody    "aoce Mailer AOM State"
  271. #define  kMailerSendOptionsAttrTypeBody "aoce Mailer Send Options"
  272. #define  kJoinedAttrTypeBody            "aoce Joined"
  273. #define  kUnconfiguredAttrTypeBody        "aoce Unconfigured"
  274. #define  kVersionAttrTypeBody            "aoce Version"
  275. #define  kLocationNamesAttrTypeBody        "aoce Location Names"
  276. #define  kActiveAttrTypeBody            "aoce Active"
  277. #define  kDeleteRequestedAttrTypeBody     "aoce Delete Requested"
  278. #define  kGatewayTypeAttrTypeBody         "aoce Gateway Type"
  279. #ifndef REZ
  280. /* Miscellaneous enums: */
  281.  
  282. enum {
  283.     kRString32Size                = 32,                            /* max size of the body field in RString32 */
  284.     kRString64Size                = 64,                            /* max size of the body field in RString64 */
  285.     kNetworkSpecMaxBytes        = 32,                            /* max size of the body field in NetworkSpec */
  286.     kPathNameMaxBytes            = 1024,                            /* max size of the data field in PackedPathName */
  287.     kDirectoryNameMaxBytes        = 32,                            /* max size of the body field in DirectoryName */
  288.     kAttributeTypeMaxBytes        = 32,                            /* max size of the body field in AttributeType */
  289.     kAttrValueMaxBytes            = 65536L,                        /* max size of any attribute value */
  290.     kRStringMaxBytes            = 256,                            /* max size (in bytes) of the body field of a recordName or recordType */
  291.     kRStringMaxChars            = 128                            /* max size (in chars) of the body field of a recordName or recordType */
  292. };
  293.  
  294.  
  295. enum {
  296.     kNULLDNodeNumber            = 0,                            /* Special value meaning none specified */
  297.     kRootDNodeNumber            = 2                                /* DNodeNum corresponding to the root of the tree */
  298. };
  299.  
  300.  
  301. /* This enum is used to select the kind of RString in calls such as OCERelRString,
  302. OCEEqualRString, and OCEValidRString.
  303.  
  304. eGenericSensitive and eGenericInsensitive are enumerators that can be used if you
  305. use RStrings for things other than what you see in this file.  If you want them to
  306. be compared in a case- and diacritical-sensitive manner (c ≠ C ≠ ç), use
  307. eGenericSensitive.  If you want them to be compared in a case- and diacritical-
  308. insensitive manner (c = C = ç), use eGenericInensitive.
  309. WARNING:  do not use eGenericSensitive and eGenericInsensitive with catalog
  310. names, entity names, pathname parts, entity types, network specs, or attribute
  311. types!  Don't assume that you know how they should be compared!!! */
  312.  
  313. enum {
  314.     kOCEDirName                    = 0,
  315.     kOCERecordOrDNodeName        = 1,
  316.     kOCERecordType                = 2,
  317.     kOCENetworkSpec                = 3,
  318.     kOCEAttrType                = 4,
  319.     kOCEGenericSensitive        = 5,
  320.     kOCEGenericInsensitive        = 6
  321. };
  322.  
  323. typedef unsigned short                     RStringKind;
  324. /* Values for the signature field in Discriminator */
  325.  
  326. enum {
  327.     kDirAllKinds                = 0,
  328.     kDirADAPKind                = FOUR_CHAR_CODE('adap'),
  329.     kDirPersonalDirectoryKind    = FOUR_CHAR_CODE('pdir'),
  330.     kDirDSAMKind                = FOUR_CHAR_CODE('dsam')
  331. };
  332.  
  333.  
  334. typedef unsigned long                     OCEDirectoryKind;
  335. /* Values returned by GetDSSpecInfo() */
  336.  
  337. enum {
  338.     kOCEInvalidDSSpec            = 0x3F3F3F3F,                    /* '????' could not be determined */
  339.     kOCEDirsRootDSSpec            = FOUR_CHAR_CODE('root'),        /* root of all catalogs ("Catalogs" icon) */
  340.     kOCEDirectoryDSSpec            = FOUR_CHAR_CODE('dire'),        /* catalog */
  341.     kOCEDNodeDSSpec                = FOUR_CHAR_CODE('dnod'),        /* d-node */
  342.     kOCERecordDSSpec            = FOUR_CHAR_CODE('reco'),        /* record */
  343.     kOCEentnDSSpec                = FOUR_CHAR_CODE('entn'),        /* extensionType is 'entn' */
  344.     kOCENOTentnDSSpec            = FOUR_CHAR_CODE('not ')        /* extensionType is not 'entn' */
  345. };
  346.  
  347.  
  348. /* Values for AttributeTag */
  349.  
  350. enum {
  351.     typeRString                    = FOUR_CHAR_CODE('rstr'),
  352.     typePackedDSSpec            = FOUR_CHAR_CODE('dspc'),
  353.     typeBinary                    = FOUR_CHAR_CODE('bnry')
  354. };
  355.  
  356.  
  357. /* Bit flag corresponding to the canContainRecords bit.  Use it like this:
  358.     if (foo & kCanContainRecords)
  359.         then this dNode can contain records!
  360. kForeignNode is used to indicate nodes in the name hierarchy that correspond to
  361. foreign catalogs (meaning ADAP sees no clusters or DNodes beneath it, but
  362. mail routers might be able to route to clusters beneath it. */
  363.  
  364. enum {
  365.     kCanContainRecordsBit        = 0,
  366.     kForeignNodeBit                = 1
  367. };
  368.  
  369. /* DirNodeKind */
  370.  
  371. enum {
  372.     kCanContainRecords            = 1L << kCanContainRecordsBit,
  373.     kForeignNode                = 1L << kForeignNodeBit
  374. };
  375.  
  376. typedef unsigned long                     DirNodeKind;
  377.  
  378.  
  379. /**** Toolbox Control ****/
  380. /* We will have a version number and attributes for toolboxes off the aa5e trap
  381. and the S&F server trap.
  382.  
  383. This includes the OCE toolbox and S&F Server.  [Note: the S&F server will
  384. change to ONLY service ServerGateway calls —it will then be necessary to run
  385. it co–resident with an OCE toolbox].
  386.  
  387. The high order word will represent the S&F Server version number.  The low
  388. order word will represent the OCE toolbox version number.  These will be zero
  389. until the component is up and running.  It is not possible to know these
  390. a–priori. Note: there will not be a seperate version numbers for each component
  391. in the OCE toolbox or S&F server.
  392.  
  393. The above is consistent with the standard System 7.0 usage of Gestalt.
  394.  
  395. The oce tb attribute gestaltOCETBPresent implies the existence of OCE on a
  396. machine.
  397.  
  398. The OCE TB attribute gestaltOCETBAvailable implies the availablity of OCE calls.
  399.  
  400. The attribute gestaltOCESFServerAvailable implies the availablity of OCE calls
  401. available through the S&F server. This are essentially the server gateway calls.
  402.  
  403. Any (future) remaining OCE attributes may not be established correctly until
  404. the attribute gestaltOCETBAvailable is set.
  405.  
  406. */
  407.  
  408. /*    Constants used for Transitions. */
  409.  
  410. enum {
  411.     ATTransIPMStart                = FOUR_CHAR_CODE('ipms'),
  412.     ATTransIPMShutdown            = FOUR_CHAR_CODE('ipmd'),
  413.     ATTransDirStart                = FOUR_CHAR_CODE('dirs'),
  414.     ATTransDirShutdown            = FOUR_CHAR_CODE('dird'),
  415.     ATTransAuthStart            = FOUR_CHAR_CODE('auts'),
  416.     ATTransAuthShutdown            = FOUR_CHAR_CODE('autd'),
  417.     ATTransSFStart                = FOUR_CHAR_CODE('s&fs'),
  418.     ATTransSFShutdown            = FOUR_CHAR_CODE('s&fd')
  419. };
  420.  
  421.  
  422.  
  423. /* Some definitions for time-related parameters: */
  424. /* Interpreted as UTC seconds since 1/1/1904 */
  425. typedef unsigned long                     UTCTime;
  426. /* seconds EAST of Greenwich */
  427. typedef long                             UTCOffset;
  428. /* This is the same as the ScriptManager script. */
  429. typedef short                             CharacterSet;
  430. /**** RString ****/
  431.  
  432. /* struct RString is a maximum-sized structure.  Allocate one of these and it will
  433. hold any valid RString. */
  434. struct RString {
  435.     CharacterSet                     charSet;
  436.     unsigned short                     dataLength;
  437.     Byte                             body[256];                    /* place for characters */
  438. };
  439. typedef struct RString RString;
  440.  
  441. /* struct ProtoRString is a minimum-sized structure.  Use this for a variable-length RString. */
  442. struct ProtoRString {
  443.     CharacterSet                     charSet;
  444.     unsigned short                     dataLength;
  445. };
  446. typedef struct ProtoRString ProtoRString;
  447.  
  448. typedef RString *                        RStringPtr;
  449. typedef RStringPtr *                    RStringHandle;
  450. typedef ProtoRString *                    ProtoRStringPtr;
  451. struct RString64 {
  452.     CharacterSet                     charSet;
  453.     unsigned short                     dataLength;
  454.     Byte                             body[64];
  455. };
  456. typedef struct RString64 RString64;
  457.  
  458. struct RString32 {
  459.     CharacterSet                     charSet;
  460.     unsigned short                     dataLength;
  461.     Byte                             body[32];
  462. };
  463. typedef struct RString32 RString32;
  464.  
  465. /* Standard definitions for the entity type field and attribute type
  466. have been moved to the end of the file. */
  467.  
  468. /* Copies str1 to str2.  str2Length is the size of str2, excluding header.
  469. A memFull error will be returned if that is not as large as str1->dataLength. */
  470. EXTERN_API( OSErr )
  471. OCECopyRString                    (const RString *        str1,
  472.                                  RString *                str2,
  473.                                  unsigned short         str2Length)                            THREEWORDINLINE(0x303C, 0x0308, 0xAA5C);
  474.  
  475.  
  476. /*    Make an RString from a C string.  If the c string is bigger than rStrLength,
  477. only rStrLength bytes will be copied. (rStrLength does not include the header size) */
  478. EXTERN_API( void )
  479. OCECToRString                    (const char *            cStr,
  480.                                  CharacterSet             charSet,
  481.                                  RString *                rStr,
  482.                                  unsigned short         rStrLength)                            THREEWORDINLINE(0x303C, 0x0339, 0xAA5C);
  483.  
  484.  
  485. /*    Make an RString from a Pascal string.  If the Pascal string is bigger than rStrLength,
  486. only rStrLength bytes will be copied. (rStrLength does not include the header size) */
  487. EXTERN_API( void )
  488. OCEPToRString                    (ConstStr255Param         pStr,
  489.                                  CharacterSet             charSet,
  490.                                  RString *                rStr,
  491.                                  unsigned short         rStrLength)                            THREEWORDINLINE(0x303C, 0x033A, 0xAA5C);
  492.  
  493.  
  494. /*    Make a Pascal string from an RString.  It's up to you to check the char set of
  495. the RString, or if the length of the RString is greater than 255 (the Pascal string's
  496. length will simply be the lower byte of the RString's length).  The StringPtr that is
  497. returned will point directly into the RString (no memory will be allocated). */
  498. EXTERN_API( StringPtr )
  499. OCERToPString                    (const RString *        rStr)                                THREEWORDINLINE(0x303C, 0x033B, 0xAA5C);
  500.  
  501. /*    Check the relative equality of two RStrings.  Determines if str1 is greater than,
  502. equal to, or less than str2.  Result types for OCERelRString are defined in <OSUtils.h>
  503. (same as for RelString). */
  504. EXTERN_API( short )
  505. OCERelRString                    (const void *            str1,
  506.                                  const void *            str2,
  507.                                  RStringKind             kind)                                THREEWORDINLINE(0x303C, 0x032D, 0xAA5C);
  508.  
  509.  
  510. /*    Check for equality of two RStrings. Returns true if equal. */
  511. EXTERN_API( Boolean )
  512. OCEEqualRString                    (const void *            str1,
  513.                                  const void *            str2,
  514.                                  RStringKind             kind)                                THREEWORDINLINE(0x303C, 0x0316, 0xAA5C);
  515.  
  516.  
  517. /*    Check the validity of an RString.  Returns true if the RString is valid */
  518. EXTERN_API( Boolean )
  519. OCEValidRString                    (const void *            str,
  520.                                  RStringKind             kind)                                THREEWORDINLINE(0x303C, 0x0338, 0xAA5C);
  521.  
  522.  
  523. /**** CreationID ****/
  524. struct CreationID {
  525.     unsigned long                     source;                        /* Fields definitions and usage are not defined */
  526.     unsigned long                     seq;
  527. };
  528. typedef struct CreationID CreationID;
  529.  
  530. typedef CreationID                         AttributeCreationID;
  531. typedef CreationID *                    CreationIDPtr;
  532.  
  533. /* Returns a pointer to a null CreationID . */
  534. EXTERN_API( const CreationID *)
  535. OCENullCID                        (void)                                                        THREEWORDINLINE(0x303C, 0x0344, 0xAA5C);
  536.  
  537.  
  538. /* Returns a pointer to a special CreationID used within the PathFinder. */
  539. EXTERN_API( const CreationID *)
  540. OCEPathFinderCID                (void)                                                        THREEWORDINLINE(0x303C, 0x033C, 0xAA5C);
  541.  
  542.  
  543. /* Sets the CreationID to a null value. */
  544. EXTERN_API( void )
  545. OCESetCreationIDtoNull            (CreationID *            cid)                                THREEWORDINLINE(0x303C, 0x032E, 0xAA5C);
  546.  
  547.  
  548. /* Copies the value of cid1 to cid2. */
  549. EXTERN_API( void )
  550. OCECopyCreationID                (const CreationID *        cid1,
  551.                                  CreationID *            cid2)                                THREEWORDINLINE(0x303C, 0x0300, 0xAA5C);
  552.  
  553.  
  554. /* Check the equality of two CreationIDs. */
  555. EXTERN_API( Boolean )
  556. OCEEqualCreationID                (const CreationID *        cid1,
  557.                                  const CreationID *        cid2)                                THREEWORDINLINE(0x303C, 0x030C, 0xAA5C);
  558.  
  559.  
  560. /**** NetworkSpec ****/
  561. /* For the record, a NetworkSpec is an RString with a smaller maximum size.
  562. I don't just typedef it to an RString, because I want the definition of the NetworkSpec
  563. struct to contain the max length.  But it should be possible to typecast any
  564. NetworkSpec to an RString and use all the RString utilities on it. */
  565. struct NetworkSpec {
  566.     CharacterSet                     charSet;
  567.     unsigned short                     dataLength;
  568.     Byte                             body[32];                    /* always fixed at the max size */
  569. };
  570. typedef struct NetworkSpec NetworkSpec;
  571.  
  572. typedef NetworkSpec *                    NetworkSpecPtr;
  573.  
  574. /**** PackedPathName ****/
  575. /* struct PackedPathName is a maximum-sized structure.  Allocate one of
  576. these and it will hold any valid packed pathname. */
  577. struct PackedPathName {
  578.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  579.     Byte                             data[1022];
  580. };
  581. typedef struct PackedPathName PackedPathName;
  582.  
  583. /* struct ProtoPackedPathName is a minimum-sized structure.  Use this
  584. for a variable-length packed PathName. */
  585. struct ProtoPackedPathName {
  586.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  587.                                                                 /* Followed by data */
  588. };
  589. typedef struct ProtoPackedPathName ProtoPackedPathName;
  590.  
  591. typedef PackedPathName *                PackedPathNamePtr;
  592. typedef ProtoPackedPathName *            ProtoPackedPathNamePtr;
  593. /*
  594. Copy the contents of path1 to path2.  path2Length is the size of path2, and must
  595. be large enough to hold a copy of path1.  A memFull error will be returned if that
  596. is not the case.
  597. */
  598. EXTERN_API( OSErr )
  599. OCECopyPackedPathName            (const PackedPathName *    path1,
  600.                                  PackedPathName *        path2,
  601.                                  unsigned short         path2Length)                        THREEWORDINLINE(0x303C, 0x0304, 0xAA5C);
  602.  
  603.  
  604. /*
  605. Returns true if packed path pointer is nil, or is of zero length, or is of
  606. length 2 and nParts of zero.
  607. */
  608. EXTERN_API( Boolean )
  609. OCEIsNullPackedPathName            (const PackedPathName *    path)                                THREEWORDINLINE(0x303C, 0x031D, 0xAA5C);
  610.  
  611.  
  612. /*
  613. OCEUnpackPathName breaks apart the path into its component RStrings, writing string
  614. pointers into the array 'parts', which the client asserts can hold as many as
  615. 'nParts' elements. The number of parts actually found is returned.  Strings are
  616. placed in the array in order from lowest to highest.  The first pathName element
  617. beneath the root appears last.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO
  618. THE PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  619. WITH THE UNPACKED STRUCT AS WELL
  620. */
  621. EXTERN_API( unsigned short )
  622. OCEUnpackPathName                (const PackedPathName *    path,
  623.                                  RString *const         parts[],
  624.                                  unsigned short         nParts)                                THREEWORDINLINE(0x303C, 0x0330, 0xAA5C);
  625.  
  626. /*
  627. OCEPackedPathNameSize computes the number of bytes of memory needed to hold a
  628. PackedPathName manufactured from the array of parts.  This length
  629. includes the length of the length field of PackedPathName, so it
  630. is safe to do a NewPtr (OCEPackedPathNameSize(...)).
  631. */
  632. EXTERN_API( unsigned short )
  633. OCEPackedPathNameSize            (const RStringPtr         parts[],
  634.                                  unsigned short         nParts)                                THREEWORDINLINE(0x303C, 0x0328, 0xAA5C);
  635.  
  636. /* OCEDNodeNameCount returns the number of RStrings contained within the path. */
  637. EXTERN_API( unsigned short )
  638. OCEDNodeNameCount                (const PackedPathName *    path)                                THREEWORDINLINE(0x303C, 0x032C, 0xAA5C);
  639.  
  640.  
  641. /*
  642. OCEPackPathName packs the parts into the storage provided as 'path'.  path must be
  643. large enough to hold the packed pathname.  A memFull error will be returned if
  644. pathLength is too small.  parts[0] should contain the deepest pathName element,
  645. and parts[nParts - 1] should contain the name of the first pathName element beneath
  646. the root. 
  647. */
  648. EXTERN_API( OSErr )
  649. OCEPackPathName                    (const RStringPtr         parts[],
  650.                                  unsigned short         nParts,
  651.                                  PackedPathName *        path,
  652.                                  unsigned short         pathLength)                            THREEWORDINLINE(0x303C, 0x0323, 0xAA5C);
  653.  
  654. /*
  655. Check the equality of two packed paths.
  656. */
  657. EXTERN_API( Boolean )
  658. OCEEqualPackedPathName            (const PackedPathName *    path1,
  659.                                  const PackedPathName *    path2)                                THREEWORDINLINE(0x303C, 0x0311, 0xAA5C);
  660.  
  661.  
  662. /*
  663. OCEValidPackedPathName checks that the packed PathName is internally consistent.
  664. Returns true if it's ok.
  665. */
  666. EXTERN_API( Boolean )
  667. OCEValidPackedPathName            (const PackedPathName *    path)                                THREEWORDINLINE(0x303C, 0x0334, 0xAA5C);
  668.  
  669.  
  670. /**** DirDiscriminator ****/
  671. struct DirDiscriminator {
  672.     OCEDirectoryKind                 signature;
  673.     unsigned long                     misc;
  674. };
  675. typedef struct DirDiscriminator DirDiscriminator;
  676.  
  677. /* Copies the value of disc1 to disc2. */
  678. EXTERN_API( void )
  679. OCECopyDirDiscriminator            (const DirDiscriminator * disc1,
  680.                                  DirDiscriminator *        disc2)                                THREEWORDINLINE(0x303C, 0x0301, 0xAA5C);
  681.  
  682.  
  683. /* Check the equality of two DirDiscriminators. */
  684. EXTERN_API( Boolean )
  685. OCEEqualDirDiscriminator        (const DirDiscriminator * disc1,
  686.                                  const DirDiscriminator * disc2)                            THREEWORDINLINE(0x303C, 0x030D, 0xAA5C);
  687.  
  688. /*
  689. This structure is called RLI because it really contains all the info you
  690. need to locate a record within the entire name space.  It contains four fields.
  691. The first two are the name of the catalog and a catalog discriminator.  These
  692. two fields are used to indicate to which catalog a given record belongs.  The
  693. discriminator is used to distinguish between two different catalogs that have
  694. the same name.
  695.  
  696. The other two fields in the RLI structure are used to indicate a particular
  697. catalog node within the catalog specified by the directoryName and
  698. discriminator fields.  These fields are exactly analagous to the dirID and
  699. pathname used in HFS.  It is possible to specify a dNode just by dNodeNumber
  700. (pathname is nil), or just by pathname (dNodeNumber is set to kNULLDNodeNumber),
  701. or by a combination of the two.  The latter is called a 'partial pathname', and
  702. while it is valid in the Catalog Manager API, it is not supported by ADAP
  703. catalogs in Release 1.
  704.  
  705. Note that the path parameter does not include the catalog name, but holds
  706. the names of all the nodes on the path to the desired catalog node, starting
  707. with the catalog node and working its way up the tree.
  708. */
  709.  
  710. /**** RLI ****/
  711.  
  712. struct DirectoryName {
  713.     CharacterSet                     charSet;
  714.     unsigned short                     dataLength;
  715.     Byte                             body[32];                    /* space for catalog name */
  716. };
  717. typedef struct DirectoryName DirectoryName;
  718.  
  719. typedef DirectoryName *                    DirectoryNamePtr;
  720. /* Catalog node number */
  721. typedef unsigned long                     DNodeNum;
  722. struct RLI {
  723.     DirectoryNamePtr                 directoryName;                /* pointer to the name of the catalog root */
  724.     DirDiscriminator                 discriminator;                /* used to discriminate between dup catalog names */
  725.     DNodeNum                         dNodeNumber;                /* number of the node */
  726.     PackedPathNamePtr                 path;                        /* old-style RLI */
  727. };
  728. typedef struct RLI RLI;
  729.  
  730. typedef RLI *                            RLIPtr;
  731. /*
  732. Create a new RLI from the catalog name, discriminator, DNode number, and
  733. PackedPathName.  You must allocate the storage for the RLI and pass in a pointer
  734. to it.
  735. */
  736. EXTERN_API( void )
  737. OCENewRLI                        (RLI *                    newRLI,
  738.                                  const DirectoryName *    dirName,
  739.                                  DirDiscriminator *        discriminator,
  740.                                  DNodeNum                 dNodeNumber,
  741.                                  const PackedPathName *    path)                                THREEWORDINLINE(0x303C, 0x031F, 0xAA5C);
  742.  
  743.  
  744. /*
  745. Duplicate the contents of rli1 to rli2.  No errors are returned. This
  746. simply copies the pointers to the catalog name and path, wiping out any pointer
  747. that you might have had in there.
  748. */
  749. EXTERN_API( void )
  750. OCEDuplicateRLI                    (const RLI *            rli1,
  751.                                  RLI *                    rli2)                                THREEWORDINLINE(0x303C, 0x030B, 0xAA5C);
  752.  
  753.  
  754. /*
  755. Copy the contents of rli1 to rli2.  rli2 must already contain
  756. pointers to structures large enough to hold copies of the corresponding
  757. fields from rli1.  A memFull error will be returned if that is not the case.
  758. So if you allocate a brand new empty destination, you must at least set up
  759. its length fields.
  760. */
  761. EXTERN_API( OSErr )
  762. OCECopyRLI                        (const RLI *            rli1,
  763.                                  RLI *                    rli2)                                THREEWORDINLINE(0x303C, 0x0307, 0xAA5C);
  764.  
  765.  
  766. /*
  767. Check the equality of two RLIs.  This will take into account differences
  768. in the case and diacriticals of the directoryName and the PathName.
  769. NOTE THAT THIS WILL FAIL IF rli1 CONTAINS A DNODENUMBER AND A NIL PATHNAME,
  770. AND rli2 CONTAINS kNULLDNodeNumber AND A NON-NIL PATHNAME.  IN OTHER WORDS,
  771. THE TWO rlis MUST BE OF THE SAME FORM TO CHECK FOR EQUALITY.
  772. The one exception is that if the pathname is nil, a dNodeNumber of zero and
  773. kRootDNodeNumber will be treated as equal.
  774. */
  775. EXTERN_API( Boolean )
  776. OCEEqualRLI                        (const RLI *            rli1,
  777.                                  const RLI *            rli2)                                THREEWORDINLINE(0x303C, 0x0315, 0xAA5C);
  778.  
  779.  
  780. /*
  781. Check the validity of an RLI.  This checks that the catalog name length
  782. is within bounds, and the packed pathname (if specified) is valid.
  783. */
  784. EXTERN_API( Boolean )
  785. OCEValidRLI                        (const RLI *            theRLI)                                THREEWORDINLINE(0x303C, 0x0337, 0xAA5C);
  786.  
  787. /**** PackedRLI ****/
  788. /*
  789. struct PackedRLI is a maximum-sized structure.  Allocate one of
  790. these and it will hold any valid packed pathname.
  791. */
  792.  
  793. enum {
  794.     kRLIMaxBytes                = (sizeof(RString) + sizeof(DirDiscriminator) + sizeof(DNodeNum) + kPathNameMaxBytes)
  795. };
  796.  
  797. struct PackedRLI {
  798.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  799.     Byte                             data[1296];
  800. };
  801. typedef struct PackedRLI PackedRLI;
  802.  
  803. /*
  804. struct ProtoPackedRLI is a minimum-sized structure.  Use this
  805. for a variable-length packed RLI.
  806. */
  807. struct ProtoPackedRLI {
  808.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  809.                                                                 /* Followed by data */
  810. };
  811. typedef struct ProtoPackedRLI ProtoPackedRLI;
  812.  
  813. typedef PackedRLI *                        PackedRLIPtr;
  814. typedef ProtoPackedRLI *                ProtoPackedRLIPtr;
  815. /*
  816. Copy the contents of prli1 to prli2.  prli2Length is the size of prli2, and must
  817. be large enough to hold a copy of prli1.  A memFull error will be returned if that
  818. is not the case.
  819. */
  820. EXTERN_API( OSErr )
  821. OCECopyPackedRLI                (const PackedRLI *        prli1,
  822.                                  PackedRLI *            prli2,
  823.                                  unsigned short         prli2Length)                        THREEWORDINLINE(0x303C, 0x0305, 0xAA5C);
  824.  
  825.  
  826. /*
  827. OCEUnpackRLI breaks apart the prli into its components, writing pointers into
  828. the rli structure.  NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE
  829. PACKED STRUCT - DON'T DELETE OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED
  830. WITH THE UNPACKED STRUCT AS WELL
  831. */
  832. EXTERN_API( void )
  833. OCEUnpackRLI                    (const PackedRLI *        prli,
  834.                                  RLI *                    theRLI)                                THREEWORDINLINE(0x303C, 0x0331, 0xAA5C);
  835.  
  836.  
  837. /*
  838. OCEPackedRLISize computes the number of bytes of memory needed to hold a
  839. PackedRLI manufactured from an RLI.  This length
  840. includes the length of the length field of PackedRLI, so it
  841. is safe to do a NewPtr (OCEPackedRLISize(...)).
  842. */
  843. EXTERN_API( unsigned short )
  844. OCEPackedRLISize                (const RLI *            theRLI)                                THREEWORDINLINE(0x303C, 0x032A, 0xAA5C);
  845.  
  846.  
  847. /*
  848. OCEPackRLI packs the RLI into the storage provided as 'prli'.  prli must be
  849. large enough to hold the packed RLI.  A memFull error will be returned if
  850. prliLength is too small.
  851. */
  852. EXTERN_API( OSErr )
  853. OCEPackRLI                        (const RLI *            theRLI,
  854.                                  PackedRLI *            prli,
  855.                                  unsigned short         prliLength)                            THREEWORDINLINE(0x303C, 0x0324, 0xAA5C);
  856.  
  857.  
  858. /*
  859. OCEPackedRLIPartsSize computes the number of bytes of memory needed to hold a
  860. PackedRLI manufactured from the parts of an RLI.  This length
  861. includes the length of the length field of PackedRLI, so it
  862. is safe to do a NewPtr (OCEPackedRLIPartsSize(...)).
  863. */
  864. EXTERN_API( unsigned short )
  865. OCEPackedRLIPartsSize            (const DirectoryName *    dirName,
  866.                                  const RStringPtr         parts[],
  867.                                  unsigned short         nParts)                                THREEWORDINLINE(0x303C, 0x0329, 0xAA5C);
  868.  
  869. /*
  870. OCEPackRLIParts packs the parts of an RLI into the storage provided as 'prli'.
  871. prli must be large enough to hold the packed RLI.  A memFull error will be returned
  872. if prliLength is too small.
  873. */
  874. EXTERN_API( OSErr )
  875. OCEPackRLIParts                    (const DirectoryName *    dirName,
  876.                                  const DirDiscriminator * discriminator,
  877.                                  DNodeNum                 dNodeNumber,
  878.                                  const RStringPtr         parts[],
  879.                                  unsigned short         nParts,
  880.                                  PackedRLI *            prli,
  881.                                  unsigned short         prliLength)                            THREEWORDINLINE(0x303C, 0x0325, 0xAA5C);
  882.  
  883. /*
  884. Check the equality of two packed prlis.
  885. */
  886. EXTERN_API( Boolean )
  887. OCEEqualPackedRLI                (const PackedRLI *        prli1,
  888.                                  const PackedRLI *        prli2)                                THREEWORDINLINE(0x303C, 0x0313, 0xAA5C);
  889.  
  890.  
  891. /*
  892. Check the validity of a packed RLI.  This checks that the catalog name length
  893. is within bounds, and the packed pathname (if specified) is valid.
  894. */
  895. EXTERN_API( Boolean )
  896. OCEValidPackedRLI                (const PackedRLI *        prli)                                THREEWORDINLINE(0x303C, 0x0336, 0xAA5C);
  897.  
  898. /*
  899. If this packed RLI describes a Personal Catalog, this call will return a pointer
  900. to an alias record that can be used to find the actual file.  Otherwise, it returns nil.
  901. */
  902. EXTERN_API( AliasPtr )
  903. OCEExtractAlias                    (const PackedRLI *        prli)                                THREEWORDINLINE(0x303C, 0x0318, 0xAA5C);
  904.  
  905. /*
  906. This call returns a pointer to a packed RLI that represents the "Catalogs" icon, or
  907. the root of all catalogs.  It is used in the CollabPack.
  908. */
  909. EXTERN_API( const PackedRLI *)
  910. OCEGetDirectoryRootPackedRLI    (void)                                                        THREEWORDINLINE(0x303C, 0x0346, 0xAA5C);
  911.  
  912. /**** LocalRecordID ****/
  913. struct LocalRecordID {
  914.     CreationID                         cid;
  915.     RStringPtr                         recordName;
  916.     RStringPtr                         recordType;
  917. };
  918. typedef struct LocalRecordID LocalRecordID;
  919.  
  920. typedef LocalRecordID *                    LocalRecordIDPtr;
  921. /* Create a LocalRecordID from a name, type, and CreationID */
  922. EXTERN_API( void )
  923. OCENewLocalRecordID                (const RString *        recordName,
  924.                                  const RString *        recordType,
  925.                                  const CreationID *        cid,
  926.                                  LocalRecordID *        lRID)                                THREEWORDINLINE(0x303C, 0x031E, 0xAA5C);
  927.  
  928. /*
  929. Copy LocalRecordID lRID1 to LocalRecordID lRID2.  lRID2 must already contain
  930. pointers to RString structures large enough to hold copies of the corresponding
  931. fields from lRID1.  A memFull error will be returned if that is not the case.
  932. So if you allocate a brand new empty destination, you must at least set up
  933. its length field.
  934. */
  935. EXTERN_API( OSErr )
  936. OCECopyLocalRecordID            (const LocalRecordID *    lRID1,
  937.                                  LocalRecordID *        lRID2)                                THREEWORDINLINE(0x303C, 0x0302, 0xAA5C);
  938.  
  939.  
  940. /*
  941. Check the equality of two local RIDs.
  942. */
  943. EXTERN_API( Boolean )
  944. OCEEqualLocalRecordID            (const LocalRecordID *    lRID1,
  945.                                  const LocalRecordID *    lRID2)                                THREEWORDINLINE(0x303C, 0x030F, 0xAA5C);
  946.  
  947. /**** ShortRecordID ****/
  948. struct ShortRecordID {
  949.     PackedRLIPtr                     rli;
  950.     CreationID                         cid;
  951. };
  952. typedef struct ShortRecordID ShortRecordID;
  953.  
  954. typedef ShortRecordID *                    ShortRecordIDPtr;
  955. /* Create a ShortRecordID from an RLI struct and a CreationID */
  956. EXTERN_API( void )
  957. OCENewShortRecordID                (const PackedRLI *        theRLI,
  958.                                  const CreationID *        cid,
  959.                                  ShortRecordIDPtr         sRID)                                THREEWORDINLINE(0x303C, 0x0321, 0xAA5C);
  960.  
  961.  
  962. /*
  963. Copy ShortRecordID sRID1 to ShortRecordID sRID2.  sRID2 must already contain
  964. pointers to structures large enough to hold copies of the corresponding
  965. fields from sRID1.  A memFull error will be returned if that is not the case.
  966. So if you allocate a brand new empty destination, you must at least set up
  967. its length fields.
  968. */
  969. EXTERN_API( OSErr )
  970. OCECopyShortRecordID            (const ShortRecordID *    sRID1,
  971.                                  ShortRecordID *        sRID2)                                THREEWORDINLINE(0x303C, 0x030A, 0xAA5C);
  972.  
  973.  
  974. /*
  975. Check the equality of two short RIDs.
  976. */
  977. EXTERN_API( Boolean )
  978. OCEEqualShortRecordID            (const ShortRecordID *    sRID1,
  979.                                  const ShortRecordID *    sRID2)                                THREEWORDINLINE(0x303C, 0x0317, 0xAA5C);
  980.  
  981. /**** RecordID ****/
  982. struct RecordID {
  983.     PackedRLIPtr                     rli;                        /* pointer to a packed rli structure */
  984.     LocalRecordID                     local;
  985. };
  986. typedef struct RecordID RecordID;
  987.  
  988. typedef RecordID *                        RecordIDPtr;
  989. /*    Create a RecordID from a packed RLI struct and a LocalRecordID.
  990. This doesn't allocate any new space; the RecordID points to the same
  991. packed RLI struct and the same name and type RStrings. */
  992. EXTERN_API( void )
  993. OCENewRecordID                    (const PackedRLI *        theRLI,
  994.                                  const LocalRecordID *    lRID,
  995.                                  RecordID *                rid)                                THREEWORDINLINE(0x303C, 0x0320, 0xAA5C);
  996.  
  997.  
  998. /*
  999. Copy RecordID RID1 to RecordID RID2.  RID2 must already contain
  1000. pointers to structures large enough to hold copies of the corresponding
  1001. fields from lRID1.  A memFull error will be returned if that is not the case.
  1002. So if you allocate a brand new empty destination, you must at least set up
  1003. its length fields.
  1004. */
  1005. EXTERN_API( OSErr )
  1006. OCECopyRecordID                    (const RecordID *        rid1,
  1007.                                  const RecordID *        rid2)                                THREEWORDINLINE(0x303C, 0x0309, 0xAA5C);
  1008.  
  1009.  
  1010. /*    Check the equality of two RIDs. */
  1011. EXTERN_API( Boolean )
  1012. OCEEqualRecordID                (const RecordID *        rid1,
  1013.                                  const RecordID *        rid2)                                THREEWORDINLINE(0x303C, 0x0314, 0xAA5C);
  1014.  
  1015.  
  1016. /**** PackedRecordID ****/
  1017. /*
  1018. struct PackedRecordID is a maximum-sized structure.  Allocate one of
  1019. these and it will hold any valid packed RecordID.
  1020. */
  1021.  
  1022. enum {
  1023.     kPackedRecordIDMaxBytes        = (kPathNameMaxBytes + sizeof(DNodeNum) + sizeof(DirDiscriminator) + sizeof(CreationID) + (3 * sizeof(RString)))
  1024. };
  1025.  
  1026. struct PackedRecordID {
  1027.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  1028.     Byte                             data[1824];
  1029. };
  1030. typedef struct PackedRecordID PackedRecordID;
  1031.  
  1032. /*
  1033. struct ProtoPackedRecordID is a minimum-sized structure.  Use this
  1034. for a variable-length packed RecordID.
  1035. */
  1036. struct ProtoPackedRecordID {
  1037.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  1038.                                                                 /* Followed by data */
  1039. };
  1040. typedef struct ProtoPackedRecordID ProtoPackedRecordID;
  1041.  
  1042. typedef PackedRecordID *                PackedRecordIDPtr;
  1043. typedef ProtoPackedRecordID *            ProtoPackedRecordIDPtr;
  1044. /*
  1045. Copy PackedRecordID pRID1 to PackedRecordID pRID2.  pRID2 must already contain
  1046. pointers to structures large enough to hold copies of the corresponding
  1047. fields from pRID1.  A memFull error will be returned if that is not the case.
  1048. pRID2Length is the number of bytes that can be put into pRID2, not counting the
  1049. packed RecordID header.
  1050. */
  1051. EXTERN_API( OSErr )
  1052. OCECopyPackedRecordID            (const PackedRecordID *    pRID1,
  1053.                                  const PackedRecordID *    pRID2,
  1054.                                  unsigned short         pRID2Length)                        THREEWORDINLINE(0x303C, 0x0306, 0xAA5C);
  1055.  
  1056.  
  1057. /*
  1058. Create a RecordID from a PackedRecordID.
  1059. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1060. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL
  1061. */
  1062. EXTERN_API( void )
  1063. OCEUnpackRecordID                (const PackedRecordID *    pRID,
  1064.                                  RecordID *                rid)                                THREEWORDINLINE(0x303C, 0x0332, 0xAA5C);
  1065.  
  1066.  
  1067. /*
  1068. Create a PackedRecordID from a RecordID.  pRID must be large enough to contain
  1069. the packed RecordID.  A memFull error will be returned if that is not the case.
  1070. packedRecordIDLength is the number of bytes that can be put into pRID, not
  1071. counting the header.
  1072. */
  1073. EXTERN_API( OSErr )
  1074. OCEPackRecordID                    (const RecordID *        rid,
  1075.                                  PackedRecordID *        pRID,
  1076.                                  unsigned short         packedRecordIDLength)                THREEWORDINLINE(0x303C, 0x0326, 0xAA5C);
  1077.  
  1078.  
  1079. /*
  1080. Compute the number of bytes of memory needed to hold a RecordID when packed. This
  1081. length includes the length of the length field of PackedRecordID, so it
  1082. is safe to do a NewPtr (OCEPackedRecordIDSize(...)).
  1083. */
  1084. EXTERN_API( unsigned short )
  1085. OCEPackedRecordIDSize            (const RecordID *        rid)                                THREEWORDINLINE(0x303C, 0x032B, 0xAA5C);
  1086.  
  1087.  
  1088. /*
  1089. Check the equality of two packed RIDs.
  1090. */
  1091. EXTERN_API( Boolean )
  1092. OCEEqualPackedRecordID            (const PackedRecordID *    pRID1,
  1093.                                  const PackedRecordID *    pRID2)                                THREEWORDINLINE(0x303C, 0x0312, 0xAA5C);
  1094.  
  1095.  
  1096. /* OCEValidPackedRecordID checks the validity of a packed record ID. */
  1097. EXTERN_API( Boolean )
  1098. OCEValidPackedRecordID            (const PackedRecordID *    pRID)                                THREEWORDINLINE(0x303C, 0x0335, 0xAA5C);
  1099.  
  1100.  
  1101. /**** DSSpec ****/
  1102. struct DSSpec {
  1103.     RecordID *                        entitySpecifier;
  1104.     OSType                             extensionType;
  1105.     unsigned short                     extensionSize;
  1106.     void *                            extensionValue;
  1107. };
  1108. typedef struct DSSpec DSSpec;
  1109.  
  1110. typedef DSSpec *                        DSSpecPtr;
  1111. /*
  1112. struct PackedDSSpec is NOT a maximum-sized structure.  Allocate one of
  1113. these and it will hold any valid packed RecordID, but not necessarily any additional
  1114. data.
  1115. */
  1116.  
  1117.  
  1118. enum {
  1119.     kPackedDSSpecMaxBytes        = (sizeof(PackedRecordID) + sizeof(OSType) + sizeof(UInt16))
  1120. };
  1121.  
  1122. struct PackedDSSpec {
  1123.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  1124.     Byte                             data[1832];
  1125. };
  1126. typedef struct PackedDSSpec PackedDSSpec;
  1127.  
  1128. typedef PackedDSSpec *                    PackedDSSpecPtr;
  1129. typedef PackedDSSpecPtr *                PackedDSSpecHandle;
  1130. /*
  1131. struct ProtoPackedDSSpec is a minimum-sized structure.  Use this
  1132. for a variable-length packed DSSpec.
  1133. */
  1134. struct ProtoPackedDSSpec {
  1135.     unsigned short                     dataLength;                    /* dataLength excludes the space for the dataLength field */
  1136.                                                                 /* Followed by data */
  1137. };
  1138. typedef struct ProtoPackedDSSpec ProtoPackedDSSpec;
  1139.  
  1140. typedef ProtoPackedDSSpec *                ProtoPackedDSSpecPtr;
  1141. /*
  1142. Copy PackedDSSpec pdss1 to PackedDSSpec pdss2.  pdss2 must already contain
  1143. pointers to structures large enough to hold copies of the corresponding
  1144. fields from pdss1.  A memFull error will be returned if that is not the case.
  1145. pdss2Length is the number of bytes that can be put into pdss2, not counting the
  1146. packed DSSpec header.
  1147. */
  1148. EXTERN_API( OSErr )
  1149. OCECopyPackedDSSpec                (const PackedDSSpec *    pdss1,
  1150.                                  const PackedDSSpec *    pdss2,
  1151.                                  unsigned short         pdss2Length)                        THREEWORDINLINE(0x303C, 0x0303, 0xAA5C);
  1152.  
  1153.  
  1154. /*
  1155. Create a DSSpec from a PackedDSSpec.
  1156. NOTE THAT THE UNPACKED STRUCT CONTAINS POINTERS INTO THE PACKED STRUCT - DON'T DELETE
  1157. OR REUSE THE PACKED STRUCT UNTIL YOU ARE FINISHED WITH THE UNPACKED STRUCT AS WELL.
  1158. A pointer to the extension is returned in dss->extensionValue, and the length of that
  1159. extension is returned in dss->extensionSize.  If there is no extension, dss->extensionValue will
  1160. be set to nil.  This routine will unpack the RecordID (if any) into rid, unpack the rest
  1161. into dss, and set dss->entitySpecifier to rid.
  1162. */
  1163. EXTERN_API( void )
  1164. OCEUnpackDSSpec                    (const PackedDSSpec *    pdss,
  1165.                                  DSSpec *                dss,
  1166.                                  RecordID *                rid)                                THREEWORDINLINE(0x303C, 0x032F, 0xAA5C);
  1167.  
  1168.  
  1169. /*
  1170. Create a PackedDSSpec from a DSSpec.  pdss must be large enough to
  1171. contain the packed RecordID and any extension.  A memFull error will be returned if that
  1172. is not the case.  pdssLength is the number of bytes that can be put into pdss,
  1173. not counting the header.
  1174. */
  1175. EXTERN_API( OSErr )
  1176. OCEPackDSSpec                    (const DSSpec *            dss,
  1177.                                  PackedDSSpec *            pdss,
  1178.                                  unsigned short         pdssLength)                            THREEWORDINLINE(0x303C, 0x0322, 0xAA5C);
  1179.  
  1180.  
  1181. /*
  1182. Compute the number of bytes of memory needed to hold a DSSpec when packed. This
  1183. length includes the length of the length field of PackedDSSpec, so it
  1184. is safe to do a NewPtr (OCEPackedDSSpecSize(...)).
  1185. */
  1186. EXTERN_API( unsigned short )
  1187. OCEPackedDSSpecSize                (const DSSpec *            dss)                                THREEWORDINLINE(0x303C, 0x0327, 0xAA5C);
  1188.  
  1189.  
  1190. /*    Check the equality of two DSSpecs.  This compares all fields, even the
  1191. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1192. diacrit-insensitive manner. */
  1193. EXTERN_API( Boolean )
  1194. OCEEqualDSSpec                    (const DSSpec *            pdss1,
  1195.                                  const DSSpec *            pdss2)                                THREEWORDINLINE(0x303C, 0x030E, 0xAA5C);
  1196.  
  1197.  
  1198. /*    Check the equality of two PackedDSSpecs.  This compares all fields, even the
  1199. extension (unless extensionSize == 0).  The extensions are compared in a case-insensitive and
  1200. diacrit-insensitive manner. */
  1201. EXTERN_API( Boolean )
  1202. OCEEqualPackedDSSpec            (const PackedDSSpec *    pdss1,
  1203.                                  const PackedDSSpec *    pdss2)                                THREEWORDINLINE(0x303C, 0x0310, 0xAA5C);
  1204.  
  1205.  
  1206. /*
  1207. Check the validity of a PackedDSSpec.  If extensionType is
  1208. 'entn', pdss must contain a valid entitySpecifier.  For all other extensionTypes, a nil
  1209. entitySpecifier is valid, but if non-nil, it will be checked for validity.  No check
  1210. is made on the extension.
  1211. */
  1212. EXTERN_API( Boolean )
  1213. OCEValidPackedDSSpec            (const PackedDSSpec *    pdss)                                THREEWORDINLINE(0x303C, 0x0333, 0xAA5C);
  1214.  
  1215.  
  1216. /*
  1217. Return info about a DSSpec.  This routine does not check validity.  If the
  1218. DSSpec has no extension, we determine whether it represents the root of all
  1219. catalogs, a single catalog, a DNode, or a Record.  Else it is invalid.
  1220. If the DSSpec has an extension, we simply return the extension type.
  1221. */
  1222. EXTERN_API( OSType )
  1223. OCEGetDSSpecInfo                (const DSSpec *            spec)                                THREEWORDINLINE(0x303C, 0x0319, 0xAA5C);
  1224.  
  1225.  
  1226. /* OCEGetExtensionType returns the extensionType imbedded in the PackedDSSpec. */
  1227. EXTERN_API( OSType )
  1228. OCEGetExtensionType                (const PackedDSSpec *    pdss)                                THREEWORDINLINE(0x303C, 0x031C, 0xAA5C);
  1229.  
  1230. /*
  1231. OCEStreamPackedDSSpec streams (flattens) a catalog object a little at a time by
  1232. calling the DSSpecStreamer routine that you provide.
  1233. */
  1234. typedef CALLBACK_API( OSErr , DSSpecStreamerProcPtr )(void *buffer, unsigned long count, Boolean eof, long userData);
  1235. typedef STACK_UPP_TYPE(DSSpecStreamerProcPtr)                     DSSpecStreamerUPP;
  1236. enum { uppDSSpecStreamerProcInfo = 0x000037E0 };                 /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
  1237. #define NewDSSpecStreamerProc(userRoutine)                         (DSSpecStreamerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSSpecStreamerProcInfo, GetCurrentArchitecture())
  1238. #define CallDSSpecStreamerProc(userRoutine, buffer, count, eof, userData)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppDSSpecStreamerProcInfo, (buffer), (count), (eof), (userData))
  1239. typedef DSSpecStreamerUPP                 DSSpecStreamer;
  1240. EXTERN_API( OSErr )
  1241. OCEStreamPackedDSSpec            (const DSSpec *            dss,
  1242.                                  DSSpecStreamer         stream,
  1243.                                  long                     userData,
  1244.                                  unsigned long *        actualCount)                        THREEWORDINLINE(0x303C, 0x033D, 0xAA5C);
  1245.  
  1246. /**** AttributeType ****/
  1247. /*
  1248. For the record, an AttributeType is an RString with a smaller maximum size.
  1249. I don't just typedef it to an RString, because I want the definition of the AttributeType
  1250. struct to contain the max length, because I need to include it in the Attribute struct
  1251. below.  But it should be possible to typecast any AttributeType to an RString and use
  1252. all the RString utilities on it.
  1253. */
  1254. struct AttributeType {
  1255.     CharacterSet                     charSet;
  1256.     unsigned short                     dataLength;
  1257.     Byte                             body[32];                    /* always fixed at the max size */
  1258. };
  1259. typedef struct AttributeType AttributeType;
  1260.  
  1261. typedef AttributeType *                    AttributeTypePtr;
  1262. /* Miscellaneous defines:  (these cannot be made into enums) */
  1263.  
  1264. enum {
  1265.     kMinPackedRStringLength        = (sizeof(ProtoRString))
  1266. };
  1267.  
  1268.  
  1269. enum {
  1270.     kMinPackedRLISize            = (sizeof(ProtoPackedRLI) + sizeof(DirDiscriminator) + sizeof(DNodeNum) + kMinPackedRStringLength + sizeof(ProtoPackedPathName))
  1271. };
  1272.  
  1273. /**** AttributeValue ****/
  1274. /* same class as is used in AppleEvents */
  1275. typedef DescType                         AttributeTag;
  1276. struct AttributeValue {
  1277.     AttributeTag                     tag;
  1278.     unsigned long                     dataLength;
  1279.     void *                            bytes;
  1280. };
  1281. typedef struct AttributeValue AttributeValue;
  1282.  
  1283. typedef AttributeValue *                AttributeValuePtr;
  1284. /**** Attribute ****/
  1285. struct Attribute {
  1286.     AttributeType                     attributeType;
  1287.     AttributeCreationID             cid;
  1288.     AttributeValue                     value;
  1289. };
  1290. typedef struct Attribute Attribute;
  1291.  
  1292. typedef Attribute *                        AttributePtr;
  1293. EXTERN_API( RString *)
  1294. OCEGetIndRecordType                (OCERecordTypeIndex     stringIndex)                        THREEWORDINLINE(0x303C, 0x031B, 0xAA5C);
  1295.  
  1296. EXTERN_API( AttributeType *)
  1297. OCEGetIndAttributeType            (OCEAttributeTypeIndex     stringIndex)                        THREEWORDINLINE(0x303C, 0x031A, 0xAA5C);
  1298.  
  1299.  
  1300. enum {
  1301.     _oceTBDispatch                = 0xAA5E
  1302. };
  1303.  
  1304. /****************************************************************************************
  1305.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1306.  
  1307.    OCESizePackedRecipient, OCEPackRecipient, OCEUnpackRecipient, OCEStreamRecipient,
  1308.    OCEGetRecipientType, and OCESetRecipientType have moved to the OCE header file.
  1309.    The OCEMessaging header includes the OCE header, so no changes to your code are
  1310.    required.
  1311.  
  1312. ****************************************************************************************/
  1313. typedef DSSpec                             OCERecipient;
  1314.  
  1315. enum {
  1316.     kOCESizePackedRecipient        = 830,
  1317.     kOCEPackRecipient            = 831,
  1318.     kOCEUnpackRecipient            = 832,
  1319.     kOCEStreamRecipient            = 833,
  1320.     kOCEGetRecipientType        = 834,
  1321.     kOCESetRecipientType        = 835
  1322. };
  1323.  
  1324. /*
  1325. Compute the space that a OCERecipient would take if it were in packed
  1326. form.  [Note: does NOT even pad extensionSize, so you may get an odd #back out]
  1327. Safe to pass dereferenced handle(s).
  1328. */
  1329. EXTERN_API( unsigned short )
  1330. OCESizePackedRecipient            (const OCERecipient *    rcpt)                                THREEWORDINLINE(0x303C, 0x033E, 0xAA5C);
  1331.  
  1332.  
  1333. /*
  1334. Take an OCERecipient (scatter) and (gather) stream into the specified
  1335. buffer.  It is assumed that there is sufficient space in the buffer (that is
  1336. OCESizePackedRecipient).  Safe to pass dereferenced handle(s).
  1337. */
  1338. EXTERN_API( unsigned short )
  1339. OCEPackRecipient                (const OCERecipient *    rcpt,
  1340.                                  void *                    buffer)                                THREEWORDINLINE(0x303C, 0x033F, 0xAA5C);
  1341.  
  1342. /*
  1343. Take a packed OCERecipient and cast a the OCERecipient frame over it. Returns
  1344. amBadDestId if it doesn't look like an OCERecipient. Safe to pass dereferenced
  1345. handle(s).
  1346. */
  1347. EXTERN_API( OSErr )
  1348. OCEUnpackRecipient                (const void *            buffer,
  1349.                                  OCERecipient *            rcpt,
  1350.                                  RecordID *                entitySpecifier)                    THREEWORDINLINE(0x303C, 0x0340, 0xAA5C);
  1351.  
  1352. /*
  1353. Take an OCERecipient (scatter) and (gather) stream using the specified
  1354. function.  Safe to pass dereferenced handle(s).  If streamer function returns
  1355. OCEError OCEStreamRecipient stops execution and passes the error back to the caller
  1356. */
  1357. typedef CALLBACK_API( OSErr , OCERecipientStreamerProcPtr )(void *buffer, unsigned long count, Boolean eof, long userData);
  1358. typedef STACK_UPP_TYPE(OCERecipientStreamerProcPtr)             OCERecipientStreamerUPP;
  1359. enum { uppOCERecipientStreamerProcInfo = 0x000037E0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
  1360. #define NewOCERecipientStreamerProc(userRoutine)                 (OCERecipientStreamerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppOCERecipientStreamerProcInfo, GetCurrentArchitecture())
  1361. #define CallOCERecipientStreamerProc(userRoutine, buffer, count, eof, userData)  CALL_FOUR_PARAMETER_UPP((userRoutine), uppOCERecipientStreamerProcInfo, (buffer), (count), (eof), (userData))
  1362. typedef OCERecipientStreamerUPP         OCERecipientStreamer;
  1363. EXTERN_API( OSErr )
  1364. OCEStreamRecipient                (const OCERecipient *    rcpt,
  1365.                                  OCERecipientStreamer     stream,
  1366.                                  long                     userData,
  1367.                                  unsigned long *        actualCount)                        THREEWORDINLINE(0x303C, 0x0341, 0xAA5C);
  1368.  
  1369. /* Get the OCERecipient's extensionType. Safe to pass dereferenced handle(s).*/
  1370. EXTERN_API( OSType )
  1371. OCEGetRecipientType                (const CreationID *        cid)                                THREEWORDINLINE(0x303C, 0x0342, 0xAA5C);
  1372.  
  1373.  
  1374. /*
  1375. Set the OCERecipient's extensionType in the specified cid.  (Note: we do NOT
  1376. check for a nil pointer).  If the extensionType is 'entn', the cid is assumed
  1377. to be "valid" and is not touched.  Note: to properly handle non 'entn''s this
  1378. routine must and will zero the high long (source) of the cid! Safe to pass
  1379. dereferenced handle(s).
  1380. */
  1381. EXTERN_API( void )
  1382. OCESetRecipientType                (OSType                 extensionType,
  1383.                                  CreationID *            cid)                                THREEWORDINLINE(0x303C, 0x0343, 0xAA5C);
  1384.  
  1385. /****************************************************************************************
  1386.    PLEASE NOTE! ROUTINES HAVE MOVED TO THIS HEADER!
  1387.  
  1388.    OCEGetAccessControlDSSpec and its corresponding data type and constants have
  1389.    moved to the OCE header from OCEAuthDir. The OCEAuthDir header includes the OCE
  1390.    header, so no changes to your code are required.
  1391.    
  1392. ****************************************************************************************/
  1393. /* access categories bit numbers */
  1394.  
  1395. enum {
  1396.     kThisRecordOwnerBit            = 0,
  1397.     kFriendsBit                    = 1,
  1398.     kAuthenticatedInDNodeBit    = 2,
  1399.     kAuthenticatedInDirectoryBit = 3,
  1400.     kGuestBit                    = 4,
  1401.     kMeBit                        = 5
  1402. };
  1403.  
  1404. /* Values of CategoryMask */
  1405.  
  1406. enum {
  1407.     kThisRecordOwnerMask        = 1,
  1408.     kFriendsMask                = 2,
  1409.     kAuthenticatedInDNodeMask    = 4,
  1410.     kAuthenticatedInDirectoryMask = 8,
  1411.     kGuestMask                    = 16,
  1412.     kMeMask                        = 32
  1413. };
  1414.  
  1415. typedef unsigned long                     CategoryMask;
  1416. /*
  1417. pass kThisRecordOwnerMask, kFriendsMask, kAuthenticatedInDNodeMask, kAuthenticatedInDirectoryMask,
  1418. kGuestMask, or kMeMask to this routine, and it will return a pointer to a
  1419. DSSpec that can be used in the Get or Set Access Controls calls.
  1420. */
  1421. EXTERN_API( DSSpec *)
  1422. OCEGetAccessControlDSSpec        (CategoryMask             categoryBitMask)                    THREEWORDINLINE(0x303C, 0x0345, 0xAA5C);
  1423.  
  1424.  
  1425.  
  1426.  
  1427. #endif /* REZ */
  1428.  
  1429. #if PRAGMA_STRUCT_ALIGN
  1430.     #pragma options align=reset
  1431. #elif PRAGMA_STRUCT_PACKPUSH
  1432.     #pragma pack(pop)
  1433. #elif PRAGMA_STRUCT_PACK
  1434.     #pragma pack()
  1435. #endif
  1436.  
  1437. #ifdef PRAGMA_IMPORT_OFF
  1438. #pragma import off
  1439. #elif PRAGMA_IMPORT
  1440. #pragma import reset
  1441. #endif
  1442.  
  1443. #ifdef __cplusplus
  1444. }
  1445. #endif
  1446.  
  1447. #endif /* __OCE__ */
  1448.  
  1449.